package lab02.test31;

import javafx.beans.binding.ListExpression;

import java.util.ArrayList;
import java.util.List;

public class Test31 {

    public static void main(String[] args) {
        //集合 List Mop Set
        //Integer包装类型,int基本数据类型
       /* List<Integer> integerList=new ArrayList<>();
        integerList.add(10);
        integerList.add(45);
        integerList.add(34);
        integerList.add(39);
        integerList.add(89);
        integerList.remove(3);
        for(Integer n:integerList){
            System.out.println(n);
        }*/
       List<String> namesList=new ArrayList<String>();
       namesList.add("张三");
       namesList.add("李四");
       namesList.add("王五");
       namesList.add("马六");
       namesList.add("赵七");
       for(String string:namesList){
           System.out.print(namesList.indexOf(string));
           System.out.println(string);
       }
        System.out.println("集合的大小："+namesList.size());
        namesList.remove(2);
        System.out.println("d第三个元素是："+namesList.get(2));
        System.out.println("集合的大小："+namesList.size());

    }
}
